package com.chushouya.manager.dto.admin.dept;

import com.general.framework.core.enums.StatusEnum;
import com.general.framework.core.lang.Dates;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@ApiModel("部门列表DTO")
@Data
public class DeptListDTO {

    @ApiModelProperty("部门id")
    private Long deptId;

    @ApiModelProperty("父部门id")
    private Long parentId;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("负责人")
    private String leader;

    @ApiModelProperty("显示顺序")
    private Integer orderNum;

    @ApiModelProperty("部门状态, CommonStatusEnum")
    private Integer status;

    @ApiModelProperty("部门状态")
    private String statusDesc;

    @JsonFormat(pattern = Dates.FMT_FULL_TIME)
    private Date createTime;

    public String getStatusDesc() {
        return StatusEnum.getDesc(this.status);
    }
}
